#ifndef __RECTIFYFISHEYE__
#define __RECTIFYFISHEYE__

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <string>
using namespace std;
using namespace cv;

namespace xyVision{
class RectifyFisheye {
public:
    RectifyFisheye(const string& configName);
    void setParameters(const string& configName);

    void rectifyImg(const Mat& inputImg, Mat& outputImg);
private:
    Mat map1, map2;

    Matx33f cameraMatrix;
    Matx33f newCameraMatrix;
    Matx14f distortCoeff;
    Size imageSize;
    Size newSize;
    float scale;
};
}

#endif
